window.onresize = () => {
  // 只适配到1024-1920之间
  // 因为700 / (1920 / 24)等于8.75(小于12的字体不会显示)
  let theHTML = document.documentElement;
  let htmlWidth = theHTML.clientWidth;
  if (htmlWidth < 1024) htmlWidth = 1024;
  if (htmlWidth > 1920) htmlWidth = 1920; // html的可用宽度限制(要跟viewport的最小和最大同步 - 适配)
  document.documentElement.style.fontSize = htmlWidth / (1920 / 24) + "px";
}
window.onresize();